Carbon


ShowPen

Header: Quickdraw.h Carbon status: Supported

Changes the ink of a graphics pen from invisible to visible, making pen drawing appear on the screen.

void ShowPen ();
DISCUSSION

ShowPen is called by the functions CloseRgn, ClosePoly, and ClosePicture.

The ShowPen function increments the pnVis field of the current graphics port. For 0 or positive values, the pen drawing shows on the screen.

For example, if you have used the HidePen function to decrement the pnVis field from 0 to –1, use the ShowPen function to make its value 0 so that QuickDraw resumes drawing on the screen. Subsequent calls to ShowPen increment pnVis beyond 0, so every call to ShowPen should be balanced by a call to HidePen.

This pen-manipulation function uses the local coordinate system of the current graphics port. Remember that each graphics port has its own pen, the state of which is stored in several fields of its GrafPort or CGrafPort structure. If you draw in one graphics port, change to another, and return to the first, the pen for the first graphics port has the same state as when you left it.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)